package com.cxf.rest;

import javax.ws.rs.core.Response;

import org.apache.cxf.jaxrs.client.WebClient;

public class TestClient {
	
	public static void main(String[] args) {
		
		WebClient client = WebClient.create("http://localhost:8080/rest/cxf");
		
		Person person = client.path("/person/profile/2").accept("application/xml").type("application/xml").get(Person.class);
		
		System.out.println(person.getId() + ": " + person.getName());
		
		System.out.println("-----------------------------------");
		
		Response response = client.path("/person/list").accept("application/json").type("application/json").get();
		System.out.println(response.getMetadata());
		
	}
}
